<template>
  <div id="roles">
    <breadcrumb :mannage="mannage" :List="List" />
    <el-card>
      <el-button type="primary">添加角色</el-button>
    </el-card>
    <el-table border :data="RolesList">
      <!-- <el-table-column type="expand"></el-table-column> -->
      <el-table-column type="index" align="center"></el-table-column>
      <el-table-column
        label="角色名称"
        prop="roleName"
        align="center"
      ></el-table-column>
      <el-table-column
        label="角色名称"
        prop="roleDesc"
        align="center"
      ></el-table-column>
      <el-table-column label="操作" align="center">
        <template v-slot:default="scope">
          <el-tooltip
            class="item"
            effect="dark"
            content="Top Center 提示文字"
            placement="top"
          >
            <el-button type="primary" icon="el-icon-edit" circle></el-button>
          </el-tooltip>
          <el-tooltip
            class="item"
            effect="dark"
            content="Top Center 提示文字"
            placement="top"
          >
            <el-button type="danger" icon="el-icon-delete" circle></el-button>
          </el-tooltip>
          <el-tooltip
            class="item"
            effect="dark"
            content="Top Center 提示文字"
            placement="top"
          >
            <el-button type="warning" icon="el-icon-setting" circle></el-button>
          </el-tooltip>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import Breadcrumb from "@/components/Breadcrumb/Breadcrumb";
import { getRoles } from "@/api/power.js";
export default {
  data() {
    return {
      mannage: "权限管理",
      List: "角色列表",
      RolesList: [],
    };
  },
  components: {
    Breadcrumb,
  },
  created() {
    this.getRolesList();
  },
  methods: {
    async getRolesList() {
      const { data: res } = await getRoles();
      this.RolesList = res.data;
      console.log(res);
    },
  },
};
</script>

<style>
</style>